home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Grafik / Misc / ImageEnginer / ARexx / Vignette.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1999-09-18  |  1.6 KB  |  57 lines

  1. /**************************************************/
  2. /* Vignette V1.02                                 */
  3. /* Image Engineer script                          */
  4. /* by Simon Edwards                               */
  5. /* Applies a blurred Vignette effect to an image. */
  6. /*                                                */
  7. /* MS: Alpha now uses zoomlevel of original image */
  8. /*                                                */
  9. /**************************************************/
  10.  
  11. Options results
  12. signal on error            /* Setup a place for errors to go */
  13.  
  14. if arg()==0 then exit
  15.  
  16. LOWPASS arg(1) 7 7
  17. blurredimage=result
  18. PROJECT_INFO arg(1) Width
  19. width=result
  20. PROJECT_INFO arg(1) Height
  21. height=result
  22. PROJECT_INFO arg(1) Zoom
  23. zoomlevel=result
  24.  
  25. 'OPEN IE:alpha/Spherical.alpha 8bit'
  26. alphachannel=result
  27.  
  28. PROJECT_SET alphachannel ZOOM zoomlevel
  29.  
  30. 'MARK' arg(1) 'PRIMARY'
  31. 'MARK' blurredimage 'SECONDARY'
  32. 'MARK' alphachannel 'ALPHA'
  33. 'COMPOSITE 0 0 ALPHA STRETCH'
  34.  
  35. CLOSE alphachannel
  36. CLOSE blurredimage
  37.  
  38. exit
  39.  
  40. /*******************************************************************/
  41. /* This is where control goes when an error code is returned by IE */
  42. /* It puts up a message saying what happened and on which line     */
  43. /*******************************************************************/
  44. error:
  45. if RC=5 then do            /* Did the user just cancel us? */
  46.     IE_TO_FRONT
  47.     LAST_ERROR
  48.     'REQUEST "'||RESULT||'"'
  49.     exit
  50. end
  51. else do
  52.     IE_TO_FRONT
  53.     LAST_ERROR
  54.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  55.     exit
  56. end
  57.